﻿using System;
using SS.WPF.Framework.Display.Dialog;

namespace SS.WPF.Framework.ExceptionHandling
{
    /// <summary>
    /// Define a context 
    /// </summary>
    public interface IExceptionContext
    {
        /// <summary>
        /// Gets or sets DialogManager.
        /// </summary>
        IDialogManager DialogManager { get; set; }

        /// <summary>
        /// Return current happen exception. ExceptionProcessor will use this method 
        /// to determine is current ExceptionHandler support happen Exception or not
        /// </summary>
        /// <typeparam name="T">
        /// the typr of exception which want to get
        ///  </typeparam>
        /// <returns>
        /// exception with correct type 
        /// </returns>
        T GetException<T>() where T : Exception;

        /// <summary>
        /// helpe to display error at current window
        /// </summary>
        /// <param name="ex">
        /// The exception
        /// </param>
        /// <param name="errparams">
        /// The errparams.
        /// </param>
        void ShowErrorAtCurrentWindow(CustomException ex, object[] errparams);
    }
}